package com.fengfenglearning;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class HelloWorldTextActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button dialButton = (Button)findViewById(R.id.dialButton);
        
        TextView phoneNumber = (TextView)findViewById(R.id.phoneNumber);
        
        final CharSequence number = phoneNumber.getText();
        
        dialButton.setOnClickListener(new Button.OnClickListener() {
        	public void onClick(View v){ 
            	Intent dialIntent = new 
            	Intent(HelloWorldTextActivity.this, SecondActivity.class); 
            	dialIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK ); 
            	startActivity(dialIntent); 
            }
        });
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) { 
    	
    	menu.add(0, 0, 0,"AutoComplete"); 
    	menu.add(0, 1, 0,"Button"); 
    	menu.add(0, 2, 0,"CheckBox"); 
    	menu.add(0, 3, 1,"EditText"); 
    	menu.add(0, 4, 1,"RadioGroup"); 
    	menu.add(0, 5, 1,"Spinner");

    	return super.onCreateOptionsMenu(menu); 
    }
    
    @Override 
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case 0:
			break;
		case 1:
			break;
		case 2:
			break;
		case 3:
			break;
		case 4:
			break;
		case 5:
			break;
		default:
			break;
		}
		return true;
	}


}